package rs.dalao.syc.doctor.all.dao.persist.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
import rs.dalao.syc.doctor.all.pojo.entity.Article;
import rs.dalao.syc.doctor.all.pojo.vo.ArticleManagementVO;
import rs.dalao.syc.doctor.all.pojo.vo.ArticleValidateVO;

import java.util.List;

@Repository
public interface ArticleMapper extends BaseMapper<Article> {
    //插入一篇文章
    int insertArticle(Article article);
    //通过文章标题查询文章
    ArticleValidateVO getArticleByTitle(String title);
    //通过id查询文章
  Article getArticleById(Long id);
    //通过作者Id查询该作者发布的所有文章
    List<ArticleManagementVO> getAllArticleByAuthorId(Long authorId);
    //更行文章浏览量数据
    int updateViewCountById(Long id);

}
